<?php
header("Content-Type:text/html;charset=UTF-8");
$redirect_uri = urlencode('http://parkson.omnimkt.com/api/s2.php');

$appId='wxe214ac48790c622f';
$component_appid='wx82aa345f1fb8714b';
$url='https://open.weixin.qq.com/connect/oauth2/authorize?appid='.$appId.'&redirect_uri='.$redirect_uri.'&response_type=code&scope=snsapi_base&state=STATE&component_appid='.$component_appid.'#wechat_redirect';
 
header('Location: '.$url);
exit;